home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.3 KB | 52 lines | [TEXT/GEOL] |
- Item 4135679 10-Nov-90 10:24PST
-
- From: ALGER KPMG Peat Marwick, Jeff Alger,VCA
-
- To: GER.XSE0067 Germany - Norbert Lindenberg,IDV
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: More Sharing
-
- Norbert,
-
- I knew it couldn't be that simple. You are right, having MacApp call your
- application back through polymorphic methods is an ugly problem. However, I
- can at least dispose of one of your concerns. If MacApp stubs reside in their
- own segment, the linker will never generate JSRs, but will always go through
- the jump table. Your case c) - same-segment calls - is thus not a problem
- going from the app to MacApp. In the sharable MacApp segments, one should
- force the linker to use jump table entries throughout, so we can easily prevent
- same-segment references within the MacApp segments.
-
- There is a deeper problem in polymorphic dispatch than simply not knowing at
- link time what is polymorphic and what is not (we WILL know this from the
- application's side; the problem is the call-back from MacApp). Class IDs -
- which are assigned by the linker - must be consistent for both application and
- library for the following:
-
- • The application's polymorphic dispatch code.
- • The library's polymorphic dispatch code.
- • The class table, used by various clients like the debugging modules,
- instantiate-by-name, etc.
-
- I don't know the details of how the linker assigns class IDs; if it is
- consistent enough, we can probably fool it into assigning the MacApp classes
- first in such a way that any given MacApp class will always have the right
- class ID. This means not stripping out unused classes, which expands the size
- of the class table, but only as a function of the number of classes, not
- methods. We also have to force the library to use the application's class
- table, not its own.
-
- As to polymorphic call-backs from MacApp, this calls for a little more
- cogitation. I don't think these problems are insurmountable, even without
- linker support, but it may turn out to not be worth the effort. At a certain
- point, patching things furiously at run time becomes too dicey to justify. It
- would also appear that there is going to be a run-time penalty to pay by
- forcing things to go through the jump table throughout the library.
-
- I remain,
- Still waxing,
- Jeff Alger
-
-